//
//  Department+WCTColumnCoding.m
//  WCDBDemo
//
//  Created by 黄耀武 on 2017/8/25.
//  Copyright © 2017年 yixin. All rights reserved.
//

#import "Department.h"
#import <WCDB/WCDB.h>

@interface Department (WCTColumnCoding) <WCTColumnCoding>
@end

@implementation Department (WCTColumnCoding)

// 存储为String
+ (instancetype)unarchiveWithWCTValue:(NSString *)value
{
    Department *department = [Department yy_modelWithJSON:value];
    return value ? department : nil;
}

- (NSString *)archivedWCTValue
{
    return [self yy_modelToJSONString];
}

+ (WCTColumnType)columnTypeForWCDB
{
    return WCTColumnTypeString;
}

@end
